import request from '@/utils/request'

// 获取待诊患者列表
export function getWaitingPatients() {
  return request({
    url: '/api/patient/doctor/actions/waiting-patients/',
    method: 'get'
  })
}

// 叫号
export function callPatient(patientId: number) {
  return request({
    url: `/api/patient/doctor/actions/call-patient/${patientId}/`,
    method: 'post'
  })
}

// 接诊
export function treatPatient(patientId: number) {
  return request({
    url: `/api/patient/doctor/actions/treat-patient/${patientId}/`,
    method: 'post'
  })
}

// 保存病历
export function saveDiagnosis(data: any) {
  return request({
    url: '/api/patient/doctor/actions/save-diagnosis/',
    method: 'post',
    data
  })
}

// 获取患者历史病历
export function getPatientDiagnoses(patientId: number, page: number = 1, pageSize: number = 10) {
  return request({
    url: `/api/patient/doctor/actions/patient-diagnoses/${patientId}/`,
    method: 'get',
    params: {
      page,
      page_size: pageSize
    }
  })
} 